home *** CD-ROM | disk | FTP | other *** search
- property fSprNum, fID, fSupervisor, fSavedLocH, fSavedLocV, fSleepTime, fLastWakeTime, fOffStage
-
- on birth me, vSprNum, vID
- mIView(me, vSprNum, vID)
- return me
- end
-
- on mIView me, vSprNum, vID
- set fSprNum to vSprNum
- set fID to vID
- mStSupervisor(me, 0)
- mStSleepTime(me, 0)
- set fOffStage to 0
- end
-
- on mISleep me
- mStSleepTime(me, 0)
- mStLastWakeTime(me, 0)
- end
-
- on mDeath me
- nothing()
- end
-
- on mGtSprNum me
- return fSprNum
- end
-
- on mStCastNum me, vCastNum
- set the castNum of sprite mGtSprNum(me) to vCastNum
- end
-
- on mGtCastNum me
- return the castNum of sprite mGtSprNum(me)
- end
-
- on mGtID me
- return fID
- end
-
- on mStSupervisor me, vSupervisor
- set fSupervisor to vSupervisor
- end
-
- on mGtSupervisor me
- return fSupervisor
- end
-
- on mStSleepTime me, vSleepTime
- set fSleepTime to vSleepTime
- mStLastWakeTime(me, the ticks)
- end
-
- on mGtSleepTime me
- return fSleepTime
- end
-
- on mStLastWakeTime me, vWakeTime
- set fLastWakeTime to vWakeTime
- end
-
- on mGtLastWakeTime me
- return fLastWakeTime
- end
-
- on mStPuppet me, vPuppetON
- set the puppet of sprite mGtSprNum(me) to vPuppetON
- end
-
- on mIsPuppet me
- return the puppet of sprite mGtSprNum(me)
- end
-
- on mPuppetOn me
- mStPuppet(me, 1)
- end
-
- on mPuppetOff me
- mStPuppet(me, 0)
- end
-
- on mStLocH me, vLocH
- if mIsHidden(fSupervisor) then
- set fSavedLocH to vLocH
- else
- set the locH of sprite mGtSprNum(me) to vLocH
- end if
- end
-
- on mStLocV me, vLocV
- if mIsHidden(fSupervisor) then
- set fSavedLocV to vLocV
- else
- set the locV of sprite mGtSprNum(me) to vLocV
- end if
- end
-
- on mGtLocH me
- return the locH of sprite mGtSprNum(me)
- end
-
- on mGtLocV me
- return the locV of sprite mGtSprNum(me)
- end
-
- on mGtSavedLocH me
- return fSavedLocH
- end
-
- on mGtSavedLocV me
- return fSavedLocV
- end
-
- on mIsOffStage me
- return fOffStage
- end
-
- on mOffStage me
- if not fOffStage then
- if not mIsHidden(fSupervisor) then
- mSaveLoc(me)
- mForceHide(me)
- end if
- set fOffStage to 1
- end if
- end
-
- on mOnStage me
- if fOffStage then
- if not mIsHidden(fSupervisor) then
- mRestoreLoc(me)
- end if
- set fOffStage to 0
- end if
- end
-
- on mOnStageAt me, vLocH, vLocV
- if fOffStage then
- mStLocH(me, vLocH)
- mStLocV(me, vLocV)
- set fOffStage to 0
- end if
- end
-
- on mSaveLoc me
- set fSavedLocH to mGtLocH(me)
- set fSavedLocV to mGtLocV(me)
- end
-
- on mRestoreLoc me
- mStLocH(me, fSavedLocH)
- mStLocV(me, fSavedLocV)
- end
-
- on mForceHide me
- mStLocH(me, -1000)
- mStLocV(me, -1000)
- end
-
- on mVisible me
- set the visible of sprite mGtSprNum(me) to 1
- end
-
- on mInvisible me
- set the visible of sprite mGtSprNum(me) to 0
- end
-
- on mIsVisible me
- return the visible of sprite mGtSprNum(me)
- end
-
- on mStInk me, vInkNum
- set the ink of sprite mGtSprNum(me) to vInkNum
- end
-
- on mGtInk me
- return the ink of sprite mGtSprNum(me)
- end
-
- on mStCurs me, vCursNum
- set the cursor of sprite mGtSprNum(me) to vCursNum
- end
-
- on mGtCurs me
- return the cursor of sprite mGtSprNum(me)
- end
-
- on mMouseDown me
- nothing()
- end
-
- on mMouseUp me
- nothing()
- end
-
- on mEnterMouse me
- nothing()
- end
-
- on mLeaveMouse me
- nothing()
- end
-
- on mIdle me
- nothing()
- end
-
- on mWakeUp me
- if (the ticks - mGtLastWakeTime(me)) > mGtSleepTime(me) then
- mIdle(me)
- mStLastWakeTime(me, the ticks)
- end if
- end
-